using System.Data.Common;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;


namespace AbpDevelopmentLog.EntityFrameworkCore
{
    public static class AbpDevelopmentLogDbContextConfigurer
    {
        public static void Configure(DbContextOptionsBuilder<AbpDevelopmentLogDbContext> builder, string connectionString, ILoggerFactory loggerFactory = null)
        {
            if (loggerFactory != null) builder.UseLoggerFactory(loggerFactory);
            builder.UseMySql(connectionString);
        }

        public static void Configure(DbContextOptionsBuilder<AbpDevelopmentLogDbContext> builder, DbConnection connection, ILoggerFactory loggerFactory = null)
        {
            if (loggerFactory != null) builder.UseLoggerFactory(loggerFactory);
            builder.UseMySql(connection);
        }


    }
}
